home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
workbench werkzeuge
/
wbgames
/
shuffle
/
source
/
shuffle.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-07
|
7KB
|
200 lines
/*
* Source machine generated by GadToolsBox V1.4
* which is (c) Copyright 1991,92 Jaba Development
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#include <intuition/classes.h>
#include <intuition/classusr.h>
#include <intuition/imageclass.h>
#include <intuition/gadgetclass.h>
#include <workbench/workbench.h>
#include <libraries/gadtools.h>
#include <libraries/asl.h>
#include <graphics/displayinfo.h>
#include <graphics/gfxbase.h>
#include <clib/exec_protos.h>
#include <clib/intuition_protos.h>
#include <clib/gadtools_protos.h>
#include <clib/graphics_protos.h>
#include <clib/utility_protos.h>
#include <clib/dos_protos.h>
#include <clib/asl_protos.h>
#include <clib/icon_protos.h>
#include <string.h>
#include <time.h>
#include <proto/dos.h>
#include <dos/dos.h>
#include <pragmas/dos_pragmas.h>
#include <pragmas/exec_pragmas.h>
#include <pragmas/intuition_pragmas.h>
#include <pragmas/gadtools_pragmas.h>
#include <pragmas/graphics_pragmas.h>
#include <pragmas/utility_pragmas.h>
#include <pragmas/asl_pragmas.h>
#include <pragmas/icon_pragmas.h>
#define GetString( g ) ((( struct StringInfo * )g->SpecialInfo )->Buffer )
#define GetNumber( g ) ((( struct StringInfo * )g->SpecialInfo )->LongInt )
#define GD_start 0
#define GD_tiles 1
#define GD_shuffle 2
#define GD_numbers 3
#define GD_mode 4
#define GDX_start 0
#define GDX_tiles 1
#define GDX_shuffle 2
#define GDX_numbers 3
#define GDX_mode 4
#define Project0_CNT 5
#define DIR_UP 0
#define DIR_DOWN 1
#define DIR_LEFT 2
#define DIR_RIGHT 3
#define MAX_XY 16
#define MODE_TILES 0
#define MODE_GAP 1
#define NUMTILES 5
#define NUMSHUFFLES 7
#define SAVE_AS 0
#define SAVE_NAME 1
#define SAVE_DEF_ENVARC 2
#define SAVE_DEF_ENV 3
extern struct Screen *Scr;
extern UBYTE *PubScreenName;
extern APTR VisualInfo;
extern struct Window *Project0Wnd;
extern struct Menu *Project0Menus;
extern struct Gadget *Project0GList;
extern struct IntuiMessage Project0Msg;
extern struct Gadget *Project0Gadgets[5];
extern UWORD Project0Left;
extern UWORD Project0Top;
extern UWORD Project0Width;
extern UWORD Project0Height;
extern UBYTE *Project0Wdt;
extern struct TextAttr *Font, Attr;
extern UWORD FontX, FontY;
extern UWORD OffX, OffY;
extern struct GfxBase *GfxBase;
extern UBYTE *tiles0Labels[];
extern UBYTE *shuffle0Labels[];
extern UWORD Project0GTypes[];
extern struct NewGadget Project0NGad[];
extern ULONG Project0GTags[];
extern struct NewMenu Project0NewMenu[];
extern struct GfxBase *GfxBase;
extern struct IntuitionBase *IntuitionBase;
extern struct Library *GadToolsBase;
extern struct Library *AslBase;
extern struct Library *IconBase;
extern __far ULONG RangeSeed;
struct shu_data
{
struct
{
UWORD x_res;
UWORD y_res;
} resolution[5];
struct
{
UWORD dir;
UWORD opposite;
} dirs[4];
UWORD shuffles[6];
UWORD res;
UWORD x_pos[MAX_XY];
UWORD y_pos[MAX_XY];
UWORD current_x;
UWORD current_y;
UWORD old_dir;
ULONG width;
ULONG height;
ULONG shuffle;
struct Screen *sc;
struct Window *wd;
struct DrawInfo *dri;
UWORD numbers;
UWORD mode;
WORD step_x;
WORD step_y;
WORD size_x;
WORD size_y;
UWORD solved[MAX_XY][MAX_XY];
UWORD current[MAX_XY][MAX_XY];
UWORD cx;
UWORD cy;
UWORD w;
UWORD h;
struct ColorMap *oldcmap;
ULONG moves;
ULONG m_tiles;
ULONG m_shuffles;
ULONG writeicon;
UBYTE f_dir[256];
UBYTE f_file[256];
};
union wbstart
{
char **args;
struct WBStartup *msg;
};
extern struct shu_data info;
extern struct Border b1,b2;
extern WORD bp1[],bp2[];
extern int startClicked( void );
extern int tilesClicked( void );
extern int shuffleClicked( void );
extern int numbersClicked( void );
extern int modeClicked( void );
extern int Project0loadconfig( void );
extern int Project0saveconfig( void );
extern int Project0saveasconfig( void );
extern int Project0savedefault( void );
extern int Project0about( void );
extern int Project0quit( void );
extern int Project0Icon( void );
extern int SetupScreen( void );
extern void CloseDownScreen( void );
extern int HandleProject0IDCMP( void );
extern int Project0CloseWindow( void );
extern int OpenProject0Window( void );
extern void CloseProject0Window( void );
extern int Project0VanillaKey( void );
ULONG __stdargs FastRand( unsigned long seed );
UWORD __stdargs RangeRand( unsigned long maxValue );
void __stdargs main(int argc, union wbstart argv);
extern int MakeScWd(void);
extern void FreeScWd(void);
extern void CopyWBGfx(void);
extern struct Screen *CloneScreen(struct Screen *scr);
extern struct Window *MakeWd(struct Screen *scr);
extern void Play(void);
extern void SetUpValues(void);
extern void SliceBoard(void);
extern void shuffle(UWORD howmuch);
extern void MoveRect(UWORD to);
extern int _solved(void);
extern void swap(UWORD to);
void DisplayReq(struct IntuiText *text);
extern void save_config(ULONG mode);
extern void load_config(UBYTE *name);